<%@page import="cn.edu.nju.ws.sview.wyge.relations.datasets.DatasetItem"%>
<%@page import="cn.edu.nju.ws.sview.cache.URIIDCache"%>
<%@page import="cn.edu.nju.ws.sview.wyge.relations.adataset.DocumentDataset"%>
<%@page import="cn.edu.nju.ws.sview.wyge.relations.adataset.CustomDataset"%>
<%@page import="java.net.URLEncoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
     String lang = request.getParameter("lang");
     if (lang != null && lang.equals("zh")) {
	    request.getRequestDispatcher("dataset_comments_zh.jsp").forward(request,
			response);
	    return;
     }else if(lang==null){
	     lang="en" ;
     }
	String ds = request.getParameter("ds");
	String genre = null;
	int datasetId = 0;
	if (ds == null) {
		String location = "/sview/relations/index.jsp";
		response.sendRedirect(location);
	} else {
		datasetId = Integer.parseInt(ds.substring(1));
		if(ds.substring(0, 1).equals("c")){
			genre = "custom";
		}else{
			genre = "uri";
//			try{
//			datasetName = URIIDCache.getInstance().getURI(datasetId);
//			}catch(Throwable t){
//				t.printStackTrace();
//			}
		}
	}
	String datasetName = DatasetItem.getShowNameByDatasetID(datasetId, genre, lang);
	
	String user = (String)session.getAttribute("user"); 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Comments in <%=datasetName %></title>
<link rel="icon" href="/sview/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/sview/css/layout.css" />
<link rel="stylesheet" type="text/css"
	href="/sview/css/smoothness/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="/sview/css/relations/dataset_comments.css" />
<script type="text/javascript" src="/sview/script/jquery.js"></script>
<script type="text/javascript"
	src="/sview/script/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="/sview/script/global.js"></script>
<script type="text/javascript" src="/sview/script/relations/dataset_comments.js"></script>
<script type="text/javascript" src="/sview/script/relations/jquery.cookie.js"></script>
</head>
<body>
<jsp:include page="/vheader.jsp" flush="true">
   <jsp:param name="f" value="d"/>
</jsp:include>
<div class="container">
	<div class="entity-list" >
	</div>
</div>
<input type="hidden" id="display-lang" value="en" />
<input type="hidden" id="dataset" value="<%=ds %>" />
<input type="hidden" id="user" value="<%=user%>" />
<jsp:include page="/vfooter.jsp"></jsp:include>
</body>
</html>